package d0316;

public class SecondException {
    public static void main(String[] args) {
        try{
            int x=100;
            int y=2;
            System.out.println("x/y="+x/y);
            System.out.println("world");
        }catch(ArithmeticException ex){
            System.out.println("发生了数学异常");
        }catch(NullPointerException ex){
            System.out.println("发生了空指针异常");
        }finally {
            System.out.println("finally 执行");
        }
        System.out.println("程序运行结束");
    }
}
